package com.iotechn.unimall.core.exception;

/**
 * Created by rize on 2019/7/1.
 */
public class ExceptionDefinition {

    public static final ServiceExceptionDefinition THIRD_PART_SERVICE_EXCEPTION =
            new ServiceExceptionDefinition(9527, "第三方服务异常");

    public static final ServiceExceptionDefinition PLUGIN_EXCEPTION =
            new ServiceExceptionDefinition(1, "插件异常: ${0}");

    public static final ServiceExceptionDefinition THIRD_PART_IO_EXCEPTION =
            new ServiceExceptionDefinition(2, "第三方网络异常");

    public static final ServiceExceptionDefinition THIRD_PART_CUSTOM_SERVICE_EXCEPTION =
            new ServiceExceptionDefinition(0, "异常:${0}");

    public static final ServiceExceptionDefinition APP_UNKNOWN_EXCEPTION =
            new ServiceExceptionDefinition(10000, "系统未知异常");

    public static final ServiceExceptionDefinition PARAM_CHECK_FAILED =
            new ServiceExceptionDefinition(10002, "参数校验失败");

    public static final ServiceExceptionDefinition SYSTEM_BUSY =
            new ServiceExceptionDefinition(10007, "系统繁忙～");

    public static final ServiceExceptionDefinition USER_UNKNOWN_EXCEPTION =
            new ServiceExceptionDefinition(11000, "用户系统未知异常");

    public static final ServiceExceptionDefinition USER_SEND_VERIFY_FAILED =
            new ServiceExceptionDefinition(11001, "发送验证码失败");

    public static final ServiceExceptionDefinition USER_VERIFY_CODE_NOT_EXIST =
            new ServiceExceptionDefinition(11002, "验证码未发送或已过期");

    public static final ServiceExceptionDefinition USER_VERIFY_CODE_NOT_CORRECT =
            new ServiceExceptionDefinition(11003, "验证码不正确");

    public static final ServiceExceptionDefinition USER_PHONE_HAS_EXISTED =
            new ServiceExceptionDefinition(11004, "手机已经被注册");

    public static final ServiceExceptionDefinition USER_PHONE_NOT_EXIST =
            new ServiceExceptionDefinition(11005, "手机尚未绑定账号");

    public static final ServiceExceptionDefinition USER_PHONE_OR_PASSWORD_NOT_CORRECT =
            new ServiceExceptionDefinition(11006, "手机号或密码错误!");

    public static final ServiceExceptionDefinition USER_THIRD_PART_LOGIN_FAILED =
            new ServiceExceptionDefinition(11007, "用户第三方登录失败");

    public static final ServiceExceptionDefinition USER_THIRD_UNEXPECT_RESPONSE =
            new ServiceExceptionDefinition(11008, "第三方登录期望之外的错误");

    public static final ServiceExceptionDefinition USER_THIRD_PART_NOT_SUPPORT =
            new ServiceExceptionDefinition(11009, "未知的第三方登录平台");

    public static final ServiceExceptionDefinition USER_INFORMATION_MISSING =
            new ServiceExceptionDefinition(11010, "用户信息缺失，不能添加");

    public static final ServiceExceptionDefinition USER_PHONE_ALREADY_EXIST =
            new ServiceExceptionDefinition(11011, "用户电话已经存在，不能添加");
    public static final ServiceExceptionDefinition USER_PHONE_NO_VIP =
            new ServiceExceptionDefinition(11006, "您不是门店会员，无法登陆");

    public static final ServiceExceptionDefinition USER_CAN_NOT_ACTICE =
            new ServiceExceptionDefinition(11012, "用户处于冻结状态，请联系管理员");
    public static final ServiceExceptionDefinition USER_THIRD_PART_ERROR =
            new ServiceExceptionDefinition(11013, "请求第三方平台异常，请联系管理员");
    public static final ServiceExceptionDefinition OPEN_ID_EXIST =
            new ServiceExceptionDefinition(11014, "当前微信号在系统已存在,不可以绑定");

    public static final ServiceExceptionDefinition CART_UPDATE_FAILED =
            new ServiceExceptionDefinition(12001, "购物车更新失败");
    public static final ServiceExceptionDefinition ORDER_PAY_EXCEPTION =
            new ServiceExceptionDefinition(12002, "订单扫码付未知异常");

    public static final ServiceExceptionDefinition ORDER_UNKNOWN_EXCEPTION =
            new ServiceExceptionDefinition(13000, "订单系统未知异常");

    public static final ServiceExceptionDefinition ORDER_SKU_CANNOT_EMPTY =
            new ServiceExceptionDefinition(13001, "订单商品不能为空");

    public static final ServiceExceptionDefinition ORDER_SYSTEM_BUSY =
            new ServiceExceptionDefinition(13002, "操作频繁请稍后~");

    public static final ServiceExceptionDefinition ORDER_SKU_STOCK_NOT_ENOUGH =
            new ServiceExceptionDefinition(13003, "商品库存不足～");

    public static final ServiceExceptionDefinition ORDER_SKU_NOT_EXIST =
            new ServiceExceptionDefinition(13004, "商品并不存在~");

    public static final ServiceExceptionDefinition ORDER_PRICE_MUST_GT_ZERO =
            new ServiceExceptionDefinition(13005, "订单金额不可为负");

    public static final ServiceExceptionDefinition ORDER_PRICE_CHECK_FAILED =
            new ServiceExceptionDefinition(13006, "订单金额校验失败！");
    public static final ServiceExceptionDefinition SOTRE_ORDER_PRICE_CHECK_FAILED =
            new ServiceExceptionDefinition(13006, "门店订单金额优惠不能超过比例");

    public static final ServiceExceptionDefinition ORDER_COUPON_NOT_EXIST =
            new ServiceExceptionDefinition(13007, "优惠券不存在或已使用！");

    public static final ServiceExceptionDefinition ORDER_COUPON_PRICE_NOT_ENOUGH =
            new ServiceExceptionDefinition(13008, "优惠券金额未达到指定值");

    public static final ServiceExceptionDefinition ORDER_COUPON_DISCOUNT_CHECK_FAILED =
            new ServiceExceptionDefinition(13009, "订单优惠券金额校验失败");

    public static final ServiceExceptionDefinition ORDER_ADDRESS_NOT_BELONGS_TO_YOU =
            new ServiceExceptionDefinition(13010, "收货地址不属于您！");

    public static final ServiceExceptionDefinition ORDER_NOT_EXIST =
            new ServiceExceptionDefinition(13011, "订单并不存在");

    public static final ServiceExceptionDefinition ORDER_STATUS_NOT_SUPPORT_PAY =
            new ServiceExceptionDefinition(13012, "订单状态不支持支付");

    public static final ServiceExceptionDefinition ORDER_STATUS_CHANGE_FAILED =
            new ServiceExceptionDefinition(13013, "订单状态流转失败！");

    public static final ServiceExceptionDefinition ORDER_STATUS_NOT_SUPPORT_REFUND =
            new ServiceExceptionDefinition(13014, "订单状态不支持退款");

    public static final ServiceExceptionDefinition ORDER_REFUND_FAILED =
            new ServiceExceptionDefinition(13015, "微信退款失败 请检查微信账户余额");

    public static final ServiceExceptionDefinition ORDER_STATUS_NOT_SUPPORT_CANCEL =
            new ServiceExceptionDefinition(13016, "订单状态不支持取消");

    public static final ServiceExceptionDefinition ORDER_STATUS_NOT_SUPPORT_CONFIRM =
            new ServiceExceptionDefinition(13015, "订单状态不支持确认收货");

    public static final ServiceExceptionDefinition ORDER_HAS_NOT_SHIP =
            new ServiceExceptionDefinition(13017, "订单尚未发货");

    public static final ServiceExceptionDefinition ORDER_DID_NOT_SET_SHIP =
            new ServiceExceptionDefinition(13018, "订单不需要物流公司");

    public static final ServiceExceptionDefinition ORDER_LOGIN_TYPE_NOT_SUPPORT_WXPAY =
            new ServiceExceptionDefinition(13019, "当前平台不支持微信支付");

    public static final ServiceExceptionDefinition ORDER_DO_NOT_EXIST_SHIP_TRACE =
            new ServiceExceptionDefinition(13020, "暂时没有物流信息");

    public static final ServiceExceptionDefinition ORDER_PAY_CHANNEL_NOT_SUPPORT_REFUND =
            new ServiceExceptionDefinition(13021, "订单支付方式不支持退款");

    public static final ServiceExceptionDefinition ORDER_GROUP_SPU_CAN_SINGLE_TAKE =
            new ServiceExceptionDefinition(13022, "团购订单只允许单品结算");

    public static final ServiceExceptionDefinition ORDER_GROUP_SHOP_NOT_EXIST_OR_EXPIRED =
            new ServiceExceptionDefinition(13023, "团购活动已经过期或不存在");

    public static final ServiceExceptionDefinition ORDER_REFUND_SUM_MOST_LOWER_THAN_PAY_PRICE =
            new ServiceExceptionDefinition(13024, "订单退款金额需要小于等于支付金额");

    public static final ServiceExceptionDefinition ORDER_SKU_STOCK_NOT_ENOUGH_V2 =
            new ServiceExceptionDefinition(13025, "商品库存不足～");

    public static final ServiceExceptionDefinition ORDER_DISTRIBUTION_DEDUCTION_BALANCE_NOT_ENOUGH =
            new ServiceExceptionDefinition(13026, "分销抵扣余额不足");

    public static final ServiceExceptionDefinition ORDER_ADDRESS_CANNOT_BE_NULL =
            new ServiceExceptionDefinition(13027, "订单地址不能为空～");

    public static final ServiceExceptionDefinition ORDER_REFUND_DEDUCTION_SUM_MOST_LOWER_THAN_PAY_PRICE =
            new ServiceExceptionDefinition(13028, "订单退还佣金需要小于等于抵用佣金");
    public static final ServiceExceptionDefinition ORDER_REFUND_MONEY_MOST_ZERO_PRICE =
            new ServiceExceptionDefinition(13031, "退款金额大于0");
    public static final ServiceExceptionDefinition ORDER_REFUND_NUM_MOST_ZERO_PRICE =
            new ServiceExceptionDefinition(13032, "退款数量大于0");
    public static final ServiceExceptionDefinition ORDER_REFUND_NUM_MOST_BUY_PRICE =
            new ServiceExceptionDefinition(13033, "退款数量不能大于购买数量");
    public static final ServiceExceptionDefinition ORDER_REFUND_MONEY_MOST_SKU_PRICE =
            new ServiceExceptionDefinition(13034, "退款金额不能大于购买的金额");


    public static final ServiceExceptionDefinition ORDER_SKU_LIMIT =
            new ServiceExceptionDefinition(13029, "商品限制购买数量");
    public static final ServiceExceptionDefinition ORDER_SKU_XIAJIA =
            new ServiceExceptionDefinition(13030, "商品已下架");
    public static final ServiceExceptionDefinition ORDER_UNKNOWN_MEMBER =
            new ServiceExceptionDefinition(13036, "门店非会员不能余额支付");
    public static final ServiceExceptionDefinition ORDER_UN_SUPORT =
            new ServiceExceptionDefinition(13037, "暂只支持微信支付，不支持其他支付");
    public static final ServiceExceptionDefinition ORDER_DOUBLE_PAYMENT =
            new ServiceExceptionDefinition(13038, "请稍候~");
    public static final ServiceExceptionDefinition ORDER_REPEAT_SUBMISSION =
            new ServiceExceptionDefinition(13039, "操作频繁~");
    public static final ServiceExceptionDefinition ORDER_STORE_REPEAT_SUBMISSION =
            new ServiceExceptionDefinition(13040, "下单失败,请联系管理员");
    public static final ServiceExceptionDefinition ORDER_STORE_PAYMENT_FAIL =
            new ServiceExceptionDefinition(13041, "支付失败,请重新扫码支付");

    public static final ServiceExceptionDefinition COUPON_ISSUE_OVER =
            new ServiceExceptionDefinition(14001, "优惠券已经领完～");

    public static final ServiceExceptionDefinition COUPON_YOU_HAVE_OBTAINED =
            new ServiceExceptionDefinition(14002, "您已经领取过了～");

    public static final ServiceExceptionDefinition COUPON_ACTIVITY_NOT_START =
            new ServiceExceptionDefinition(14003, "优惠券活动还没开始");

    public static final ServiceExceptionDefinition COUPON_ACTIVITY_HAS_END =
            new ServiceExceptionDefinition(14004, "优惠券活动已经结束");

    public static final ServiceExceptionDefinition COUPON_HAS_LOCKED =
            new ServiceExceptionDefinition(14005, "优惠券活动已经冻结！");

    public static final ServiceExceptionDefinition COUPON_STRATEGY_INCORRECT =
            new ServiceExceptionDefinition(14006, "优惠券策略不正确");

    public static final ServiceExceptionDefinition COUPON_NOT_EXIST =
            new ServiceExceptionDefinition(14006, "优惠券不存在");

    public static final ServiceExceptionDefinition COUPON_CHECK_DATA_FAILED =
            new ServiceExceptionDefinition(14006, "优惠券审核数据失败");

    public static final ServiceExceptionDefinition COUPON_GEN_IO_EXCEPTION =
            new ServiceExceptionDefinition(14007, "生成二维码网络错误");


    public static final ServiceExceptionDefinition COLLECT_ALREADY_EXISTED =
            new ServiceExceptionDefinition(15001, "该商品不允许重复收藏");

    public static final ServiceExceptionDefinition COLLECT_PARAM_CHECK_FAILED  =
            new ServiceExceptionDefinition(15002, "收藏记录传入参数校验失败");
    public static final ServiceExceptionDefinition COLLECT_NOT_FOUND =
            new ServiceExceptionDefinition(15003, "收藏信息查询失败");


    public static final ServiceExceptionDefinition ADDRESS_QUERY_FAILED  =
            new ServiceExceptionDefinition(16001, "这是个有地址却没有默认地址的用户");

    public static final ServiceExceptionDefinition ADDRESS_DATABASE_QUERY_FAILED  =
            new ServiceExceptionDefinition(16002, "执行语句失败");

    public static final ServiceExceptionDefinition APPRAISE_PARAM_CHECK_FAILED  =
            new ServiceExceptionDefinition(17001, "参数校验失败");

    public static final ServiceExceptionDefinition APPRAISE_ORDER_CHECK_FAILED  =
            new ServiceExceptionDefinition(17002, "当前状态不允许评价");


    public static final ServiceExceptionDefinition FREIGHT_PARAM_CHECK_FAILED  =
            new ServiceExceptionDefinition(18001, "大兄弟，你传给计算邮费的信息不对啊！");

    public static final ServiceExceptionDefinition FREIGHT_TEMPLATE_NOT_EXIST =
            new ServiceExceptionDefinition(18002, "运费模版不存在");

    public static final ServiceExceptionDefinition FREIGHT_TEMPLATE_INSERT_FAILED =
            new ServiceExceptionDefinition(18003, "运费模板主表增加失败");

    public static final ServiceExceptionDefinition FREIGHT_CARRIAGE_INSERT_FAILED =
            new ServiceExceptionDefinition(18004, "运费模板副表增加失败");

    public static final ServiceExceptionDefinition FREIGHT_TEMPLATE_DELETE_FAILED =
            new ServiceExceptionDefinition(18005, "运费模板主表删除失败");

    public static final ServiceExceptionDefinition FREIGHT_CARRIAGE_DELETE_FAILED =
            new ServiceExceptionDefinition(18006, "运费模板副表删除失败");

    public static final ServiceExceptionDefinition FREIGHT_TEMPLATE_UPDATE_FAILED =
            new ServiceExceptionDefinition(18007, "运费模板主表修改失败");

    public static final ServiceExceptionDefinition FREIGHT_CARRIAGE_UPDATE_FAILED =
            new ServiceExceptionDefinition(18008, "运费模板副表修改失败");

    public static final ServiceExceptionDefinition FREIGHT_TEMPLATE_QUERY_FAILED =
            new ServiceExceptionDefinition(18009, "运费模板主表查询失败");

    public static final ServiceExceptionDefinition FREIGHT_SPU_QUERY_HAS =
            new ServiceExceptionDefinition(18010, "当前仍有商品使用该模板");


    public static final ServiceExceptionDefinition FOOTPRINT_DELETE_FAILED  =
            new ServiceExceptionDefinition(19001, "大兄弟，没有你传的足迹，或者你在误删他人足迹");

    public static final ServiceExceptionDefinition FOOTPRINT_SELECT_PARAM_CHECK  =
            new ServiceExceptionDefinition(19002, "大兄弟，不会传分页数据，你就别传！有默认值");


    public static final ServiceExceptionDefinition GOODS_NOT_EXIST =
            new ServiceExceptionDefinition(20001, "商品并不存在");

    public static final ServiceExceptionDefinition GOODS_SKU_LIST_EMPTY =
            new ServiceExceptionDefinition(20002, "商品的类型（Sku）列表不能为空");

    public static final ServiceExceptionDefinition GOODS_CREATE_HAS_ID =
            new ServiceExceptionDefinition(20003, "创建商品时请不要传入Id");

    public static final ServiceExceptionDefinition GOODS_CREATE_BARCODE_REPEAT =
            new ServiceExceptionDefinition(20004, "商品条码已经存在了 商品Id:${0} 重复Sku:${1}");

    public static final ServiceExceptionDefinition GOODS_PRICE_CHECKED_FAILED =
            new ServiceExceptionDefinition(20005, "必须 vip价格 <= 现价 <= 原价");

    public static final ServiceExceptionDefinition GOODS_NEED_STATUS_ERROR =
            new ServiceExceptionDefinition(20006, "商品已经是该状态,无法改变");

    public static final ServiceExceptionDefinition GOODS_UPDATE_SQL_FAILED =
            new ServiceExceptionDefinition(20007, "商品执行修改SQL失败");



    public static final ServiceExceptionDefinition RECOMMEND_SPU_NO_HAS =
            new ServiceExceptionDefinition(21001, "你要加入推荐的公司");

    public static final ServiceExceptionDefinition RECOMMEND_ALREADY_HAS =
            new ServiceExceptionDefinition(21002, "你要加入推荐的商品已推荐");

    public static final ServiceExceptionDefinition RECOMMEND_SQL_ADD_FAILED =
            new ServiceExceptionDefinition(21003, "加入推荐数据库失败");

    public static final ServiceExceptionDefinition RECOMMEND_SQL_DELETE_FAILED =
            new ServiceExceptionDefinition(21004, "删除推荐数据库失败");

    public static final ServiceExceptionDefinition ADVERTISEMENT_SQL_ADD_FAILED =
            new ServiceExceptionDefinition(22001, "添加广告数据库失败");

    public static final ServiceExceptionDefinition ADVERTISEMENT_SQL_DELETE_FAILED =
            new ServiceExceptionDefinition(22002, "删除广告数据库失败");

    public static final ServiceExceptionDefinition ADVERTISEMENT_SQL_UPDATE_FAILED =
            new ServiceExceptionDefinition(22003, "修改广告数据库失败");

    public static final ServiceExceptionDefinition DISTRIBUTION_USER_NOT_EXIST =
            new ServiceExceptionDefinition(22004, "分销用户不存在");

    public static final ServiceExceptionDefinition DISTRIBUTION_LEVEL_THREE_CANNOT_CREATE_DISTRIBUTOR =
            new ServiceExceptionDefinition(22005, "三级分销者无法创建新的分销者");

    public static final ServiceExceptionDefinition DISTRIBUTION_FREEZE_BALANCE_NOT_ENOUGH =
            new ServiceExceptionDefinition(22006, "分销用户冻结余额不足");

    public static final ServiceExceptionDefinition DISTRIBUTION_HAS_BEEN_UNFREEZE =
            new ServiceExceptionDefinition(22007, "分销金额已经被解冻");

    public static final ServiceExceptionDefinition DISTRIBUTION_YOUR_DATA_NOT_CONSTANCY =
            new ServiceExceptionDefinition(22008, "您的资金数据不一致,无法操作");

    public static final ServiceExceptionDefinition DISTRIBUTION_BALANCE_NOT_ENOUGH =
            new ServiceExceptionDefinition(22009, "您的余额不足，无法提现");

    public static final ServiceExceptionDefinition DISTRIBUTION_YOU_CAN_ONLY_WITHDRAW_ONCE_EACH_DAY =
            new ServiceExceptionDefinition(22010, "最近12小时内提过现了");

    public static final ServiceExceptionDefinition DISTRIBUTION_CANNOT_LOCATE_USER_WECHAT =
            new ServiceExceptionDefinition(22011, "无法定位到用户微信");

    public static final ServiceExceptionDefinition DISTRIBUTION_YOU_ARE_DISTRIBUTION_USER =
            new ServiceExceptionDefinition(22021, "您已经是分销人员了，不能再添加了");

    public static final ServiceExceptionDefinition DISTRIBUTION_WITHDRAW_DATA_ERROR =
            new ServiceExceptionDefinition(22022, "分销提现数据过期，请刷新页面");

    public static final ServiceExceptionDefinition DISTRIBUTION_DEDUCTION_STATUS_INCORRECT =
            new ServiceExceptionDefinition(22023, "分销抵扣状态不正确");


    public static final ServiceExceptionDefinition PAY_BALANCE_NOT_ENOUGH =
            new ServiceExceptionDefinition(22024, "您的余额不足");

    public static final ServiceExceptionDefinition ADMIN_UNKNOWN_EXCEPTION =
            new ServiceExceptionDefinition(50000, "管理员系统未知异常");

    public static final ServiceExceptionDefinition ADMIN_NOT_EXIST =
            new ServiceExceptionDefinition(50001, "管理员不存在");

    public static final ServiceExceptionDefinition ADMIN_PASSWORD_ERROR =
            new ServiceExceptionDefinition(50002, "密码错误");

    public static final ServiceExceptionDefinition ADMIN_NOT_BIND_WECHAT =
            new ServiceExceptionDefinition(50003, "管理员尚未绑定微信");

    public static final ServiceExceptionDefinition ADMIN_APPLY_NOT_BELONGS_TO_YOU =
            new ServiceExceptionDefinition(50004, "用户申请表并不属于您");

    public static final ServiceExceptionDefinition ADMIN_APPLY_NOT_SUPPORT_ONE_KEY =
            new ServiceExceptionDefinition(50005, "未定义类型不支持一键发布");

    public static final ServiceExceptionDefinition ADMIN_ROLE_IS_EMPTY =
            new ServiceExceptionDefinition(50006, "管理员角色为空！");

    public static final ServiceExceptionDefinition ADMIN_USER_NAME_REPEAT =
            new ServiceExceptionDefinition(50007, "管理员用户名重复");

    public static final ServiceExceptionDefinition ADMIN_VERIFYCODE_ERROR =
            new ServiceExceptionDefinition(50008, "登陆验证码错误");

    public static final ServiceExceptionDefinition ADMIN_USER_NOT_EXITS =
            new ServiceExceptionDefinition(50009, "管理员不存在，请输入正确账号密码");

    public static final ServiceExceptionDefinition ADMIN_GUEST_NOT_NEED_VERIFY_CODE =
            new ServiceExceptionDefinition(50010, "游客用户无须验证码，请直接输入666666");

    public static final ServiceExceptionDefinition ADMIN_VERIFY_CODE_SEND_FAIL=
            new ServiceExceptionDefinition(50011, "登陆验证码发送失败");
    public static final ServiceExceptionDefinition Colonel_VERIFYCODE_ERROR =
            new ServiceExceptionDefinition(50012, "验证码错误");


    public static final ServiceExceptionDefinition CATEGORY_OUGHT_TO_EMPTY =
            new ServiceExceptionDefinition(51001, "该类目还有子类目或着商品");

    public static final ServiceExceptionDefinition CATEGORY_OR_PARENT_NODE_IS_EMPTY =
            new ServiceExceptionDefinition(51002, "传入ID，父节点ID不能为空");

    public static final ServiceExceptionDefinition PARENT_CAN_NOT_EQUALS_ONESELF =
            new ServiceExceptionDefinition(51003, "父节点不能是自己");

    public static final ServiceExceptionDefinition NOT_FIND_PARENT_NODE =
            new ServiceExceptionDefinition(51004, "未在数据库中查找到父节点");

    public static final ServiceExceptionDefinition CATEGORY_UPDATE_FAILURE =
            new ServiceExceptionDefinition(51005, "类目数据库修改失败");

    public static final ServiceExceptionDefinition PARENT_NODE_INFORMATION_ERROR =
            new ServiceExceptionDefinition(51006, "父节点信息不准确");

    public static final ServiceExceptionDefinition DATABASE_INSERT_FAILURE =
            new ServiceExceptionDefinition(51007, "数据库类目插入失败");



    public static final ServiceExceptionDefinition ORDER_EXCEL_PARAM_ERROR =
            new ServiceExceptionDefinition(52001, "生成excel查询参数错误");


    public static final ServiceExceptionDefinition SPU_NO_EXITS_OR_ONLY_SPU =
            new ServiceExceptionDefinition(53001, "团购商品中对应的spu不存在或只有spu存在,没有对应sku存在");

    public static final ServiceExceptionDefinition GROUP_SHOP_SKU_NUMBER_ERROR =
            new ServiceExceptionDefinition(53002, "团购商品sku数量不对应");

    public static final ServiceExceptionDefinition GROUP_SHOP_SKU_ID_ERROR =
            new ServiceExceptionDefinition(53003, "团购商品sku所对应的sku_id错误.");

    public static final ServiceExceptionDefinition GROUP_SHOP_SKU_PRICE_ERROR =
            new ServiceExceptionDefinition(53004, "团购商品sku价格为空,或者为0");

    public static final ServiceExceptionDefinition GROUP_SHOP_SKU_GROUP_SHOP_ID_ERROR =
            new ServiceExceptionDefinition(53005, "团购商品sku的团购商品spuID和传入的不一致");

    public static final ServiceExceptionDefinition GROUP_SHOP_SPU_ADD_SQL_QUERY_ERROR =
            new ServiceExceptionDefinition(53006, "团购商品spu添加出误");

    public static final ServiceExceptionDefinition GROUP_SHOP_SKU_ADD_SQL_QUERY_ERROR =
            new ServiceExceptionDefinition(53007, "团购商品sku添加出错");

    public static final ServiceExceptionDefinition GROUP_SHOP_SPU_DELETE_SQL_QUERY_ERROR =
            new ServiceExceptionDefinition(53008, "团购商品spu删除出错");

    public static final ServiceExceptionDefinition GROUP_SHOP_SKU_DELETE_SQL_QUERY_ERROR =
            new ServiceExceptionDefinition(53009, "团购商品sku删除出错");

    public static final ServiceExceptionDefinition GROUP_SHOP_SPU_NO_EXITS =
            new ServiceExceptionDefinition(53010, "团购商品spu不存在");

    public static final ServiceExceptionDefinition GROUP_SHOP_SPU_UPDATE_SQL_QUERY_ERROR =
            new ServiceExceptionDefinition(53011, "团购商品spu更新失败");

    public static final ServiceExceptionDefinition GROUP_SHOP_START_MUST_LESS_THAN_END =
            new ServiceExceptionDefinition(53012, "团购开始时间必须小于结束时间");

    public static final ServiceExceptionDefinition ORDER_IS_NOT_GROUP_SHOP_STATUS =
            new ServiceExceptionDefinition(53013, "订单状态不是团购状态");

    public static final ServiceExceptionDefinition GROUP_SHOP_ALREADY_EXIT =
            new ServiceExceptionDefinition(53014, "该商品已经是团购商品");
    public static final ServiceExceptionDefinition GROUP_SHOP_SPU_NO_ACTIVE =
            new ServiceExceptionDefinition(53016, "团购商品已下架，不能进行团购，需要先上架");


    public static final ServiceExceptionDefinition GROUP_SHOP_ALREAD_ATCIVE =
            new ServiceExceptionDefinition(53015, "团购商品已经在团购中.无法进行编辑或修改操作");

    public static final ServiceExceptionDefinition DISTRIBUTION_UNKNOWN_EXCEPTION =
            new ServiceExceptionDefinition(54000, "分销系统未知异常");

    public static final ServiceExceptionDefinition DISTRIBUTION_USER_IS_THE_MEMBER =
            new ServiceExceptionDefinition(54001, "用户已经是分销成员了");

    public static final ServiceExceptionDefinition DISTRIBUTION_NOT_EXIST =
            new ServiceExceptionDefinition(54002, "当前分销用户不存在");

    public static final ServiceExceptionDefinition DISTRIBUTION_LEVEL_LOGIC_ERROR =
            new ServiceExceptionDefinition(54003, "分销等级逻辑错误");

    public static final ServiceExceptionDefinition DISTRIBUTION_STRATEGY_HAS_EXIST =
            new ServiceExceptionDefinition(54004, "该类型已经有策略，请删除后重新添加");

    public static final ServiceExceptionDefinition DISTRIBUTION_STRATEGY_NOT_THIRD_CATEGORY =
            new ServiceExceptionDefinition(54005, "请关联第三级类目");

    public static final ServiceExceptionDefinition DISTRIBUTION_STRATEGY_RADIO_CHECK_FAILED =
            new ServiceExceptionDefinition(54006, "三级代理提点总和必须为100%");

    public static final ServiceExceptionDefinition DISTRIBUTION_PARENT_USER_IS_NOT_DISTRIBUTOR =
            new ServiceExceptionDefinition(54007, "父用户不是分销用户");

    public static final ServiceExceptionDefinition DISTRIBUTION_THIRD_LEVEL_CANNOT_ALLOW_CHILD =
            new ServiceExceptionDefinition(54008, "第三级分销不能发展下线");

    public static final ServiceExceptionDefinition CARD_CHECK_DATA_FAILED =
            new ServiceExceptionDefinition(61001, "会员卡数据异常");
    public static final ServiceExceptionDefinition CARD_NOT_EXIST =
            new ServiceExceptionDefinition(61002, "会员卡不存在");


    public static final ServiceExceptionDefinition CARD_CHECK_EXIST =
            new ServiceExceptionDefinition(61003, "本批次会员卡已生成");
    public static final ServiceExceptionDefinition CARD_IS_USE =
            new ServiceExceptionDefinition(61004, "会员卡已使用");

    public static final ServiceExceptionDefinition BINGD_COLONEL_STATUS  =
            new ServiceExceptionDefinition(61005, "绑定团长失败");
    public static final ServiceExceptionDefinition UNBINGD_COLONEL_STATUS  =
            new ServiceExceptionDefinition(61005, "解绑团长失败");
    public static final ServiceExceptionDefinition USER_COLONEL_NOT_EXIST=
            new ServiceExceptionDefinition(61007,"该用户未绑定团长");
    public static final ServiceExceptionDefinition USER_COLONEL_SHENHE_EXIST=
            new ServiceExceptionDefinition(61007,"团长审核中");
    public static final ServiceExceptionDefinition ACCOUNT_NOT_EXIST=
            new ServiceExceptionDefinition(61008,"该账号不存在");
    public static final ServiceExceptionDefinition CASHBUZU =
            new ServiceExceptionDefinition(61009, "提现金额不足");

    public static final ServiceExceptionDefinition DATEISNO =
            new ServiceExceptionDefinition(61010, "时间格式不对为YYYY-MM-DD~");

    public static final ServiceExceptionDefinition CURRENT_USER_STORE_NOT_EXIST=
            new ServiceExceptionDefinition(61011,"您所在的门店已经被删除");
    public static final ServiceExceptionDefinition FILE_IS_NOT_EXCEL =
            new ServiceExceptionDefinition(610012,"文件格式不是xls、xlsx，请核实!");

    public static final ServiceExceptionDefinition FILE_IS_NOT_AVAIABLE =
            new ServiceExceptionDefinition(61013,"请检查文件内容格式!");
    public static final ServiceExceptionDefinition CHAOCHUEDU =
            new ServiceExceptionDefinition(70001, "款项超出额度");


    public static final ServiceExceptionDefinition COLONEL_FREEZE_BALANCE_NOT_ENOUGH =
            new ServiceExceptionDefinition(80001, "团长冻结余额不足");
    public static final ServiceExceptionDefinition COLONEL_HAS_BEEN_UNFREEZE =
            new ServiceExceptionDefinition(80002, "佣金金额已经被解冻");
    /**
     * #########################################################################################
     * 秒杀
     */
    public static final ServiceExceptionDefinition SECKILL_STOCKCOUNT_ERROR=
            new ServiceExceptionDefinition(900001,"秒杀商品库存不足");
    public static final ServiceExceptionDefinition SECKILL_SKU_UPDATE_NOT_FIND=
            new ServiceExceptionDefinition(900002,"未找到要修改秒杀商品");
    public static final ServiceExceptionDefinition SECKILL_START_MUST_LESS_THAN_END=
            new ServiceExceptionDefinition(900003,"秒杀开始时间必须小于结束时间");
    public static final ServiceExceptionDefinition SECKILL_SPU_ADD_SQL_QUERY_ERROR=
            new ServiceExceptionDefinition(900004,"秒杀商品spu添加出误");
    public static final ServiceExceptionDefinition SECKILL_SKU_NUMBER_ERROR =
            new ServiceExceptionDefinition(900005, "秒杀商品sku数量不对应");
    public static final ServiceExceptionDefinition SECKILL_SKU_ID_ERROR =
            new ServiceExceptionDefinition(900006, "秒杀商品sku所对应的sku_id错误.");
    public static final ServiceExceptionDefinition SECKILL_SKU_PRICE_ERROR =
            new ServiceExceptionDefinition(900007, "秒杀商品sku价格为空,或者为0");
    public static final ServiceExceptionDefinition SECKILL_SKU_ADD_SQL_QUERY_ERROR =
            new ServiceExceptionDefinition(900008, "秒杀商品sku添加出错");
    public static final ServiceExceptionDefinition SECKILL_SPU_NO_EXITS_OR_ONLY_SPU =
            new ServiceExceptionDefinition(900009, "秒杀商品中对应的spu不存在或只有spu存在,没有对应sku存在");
    public static final ServiceExceptionDefinition SECKILL_ALREAD_ATCIVE =
            new ServiceExceptionDefinition(900010, "秒杀商品已经在活动中.无法进行编辑或修改操作");
    public static final ServiceExceptionDefinition SECKILL_SPU_DELETE_SQL_QUERY_ERROR =
            new ServiceExceptionDefinition(900011, "秒杀商品spu删除出错");
    public static final ServiceExceptionDefinition SECKILL_SKU_DELETE_SQL_QUERY_ERROR =
            new ServiceExceptionDefinition(900012, "秒杀商品sku删除出错");
    public static final ServiceExceptionDefinition SECKILL_SPU_NO_EXITS =
            new ServiceExceptionDefinition(900013, "秒杀商品spu不存在");
    public static final ServiceExceptionDefinition SECKILL_SPU_UPDATE_SQL_QUERY_ERROR =
            new ServiceExceptionDefinition(900014, "秒杀商品spu更新失败");
    public static final ServiceExceptionDefinition SECKILL_SKU_UPDATE_SQL_QUERY_ERROR =
            new ServiceExceptionDefinition(900015, "秒杀商品sku修改出错");
    public static final ServiceExceptionDefinition SECKILL_SKU_DELETE_AND_UDPATE_SKU =
            new ServiceExceptionDefinition(900016, "秒杀商品sku删除时归还大库库存出错");
    public static final ServiceExceptionDefinition SECKILL_ALREAD_NOT_ATCIVE =
            new ServiceExceptionDefinition(900017, "秒杀商品未开启.无法暂停");
    public static final ServiceExceptionDefinition SECKILL_SPUID_NOEXIST =
            new ServiceExceptionDefinition(900018, "秒杀商品不存在");
    public static final ServiceExceptionDefinition ORDER_SECKILL_SPU_CAN_SINGLE_TAKE =
            new ServiceExceptionDefinition(900019, "秒杀订单只允许单品结算");
    public static final ServiceExceptionDefinition ORDER_SECKILL_NOT_EXIST_OR_EXPIRED =
            new ServiceExceptionDefinition(900020, "秒杀活动已经过期或不存在");
    public static final ServiceExceptionDefinition ORDER_SECKILL_INSERT_ORDER_SKU_ERROR =
            new ServiceExceptionDefinition(900021, "秒杀商品订单记录失败");
    public static final ServiceExceptionDefinition SECKILL_SKU_START_ERROR =
            new ServiceExceptionDefinition(900021, "秒杀活动启动失败");
    public static final ServiceExceptionDefinition SECKILL_SPU_STATUS_STOCK =
            new ServiceExceptionDefinition(900022, "此商品为下架商品");

    /**
     * 微信
     * 充值
     *
     */
    public static final ServiceExceptionDefinition RECHARGEABLE_FREQUENT_OPERATION=
            new ServiceExceptionDefinition(1000001, "点击频繁，请稍候~");
    public static final ServiceExceptionDefinition RECHARGEABLE_ORDER_STATUS_NOT_SUPPORT_PAY =
            new ServiceExceptionDefinition(1000002, "微信充值订单状态不支持支付");
    public static final ServiceExceptionDefinition RECHARGEABLE_MAKE_ORDER_FAIL =
            new ServiceExceptionDefinition(1000003, "微信充值失败");


    /**
     * ######################################################################
     * ##############################采购端##################################
     * ######################################################################
     */
    public static final ServiceExceptionDefinition PURCHASE_NOT_CHECK_GOODS =
            new ServiceExceptionDefinition(1000001, "此采购活动未选择商品");
    public static final ServiceExceptionDefinition PURCHASE_CREATE_ERROR =
            new ServiceExceptionDefinition(1000002, "添加采购单异常");
    public static final ServiceExceptionDefinition UPDATE_SUPPLIER_ERROR =
            new ServiceExceptionDefinition(1000003, "修改供应商地址异常");
    public static final ServiceExceptionDefinition SELECT_PURCHASEORDERDETAILS_ERROR =
            new ServiceExceptionDefinition(1000004, "采购单详情未查询到数据");
    public static final ServiceExceptionDefinition DATE_CHANGE_ERROR =
            new ServiceExceptionDefinition(1000005, "采购端时间转换异常");

    /**
     *
     * ####################################################################################
     * ####################################################################################
     * #########################       门           店                 ####################
     * ####################################################################################
     */
    public static final ServiceExceptionDefinition STORE_SKU_NOT_FOUND =
            new ServiceExceptionDefinition(1100001, "该门店无此商品");
    public static final ServiceExceptionDefinition STORE_GOODS_STOCK_NOT_ENOUGH =
            new ServiceExceptionDefinition(1100002, "该门店此商库存不足");

    /**
     *
     * ####################################################################################
     * ####################################################################################
     * #########################       拼团          ####################
     * ####################################################################################
     */
    public static final ServiceExceptionDefinition GROUP_BARGIN_GOODS_NOT_FOUND =
            new ServiceExceptionDefinition(1200001, "团购商品不存在 ");
    public static final ServiceExceptionDefinition GROUP_BARGIN_NOT_FOUND =
            new ServiceExceptionDefinition(1200002, "拼团活动不存在 ");
    public static final ServiceExceptionDefinition GROUP_BARGIN_ORDER_NOT_FOUND =
            new ServiceExceptionDefinition(1200003, "拼团活动订单不存在 ");
    public static final ServiceExceptionDefinition GROUP_BARGIN_EXISTS =
            new ServiceExceptionDefinition(1200004, "拼团商品已存在 ");
    public static final ServiceExceptionDefinition GROUP_BARGIN_CANNOT_CREATE_GROUP=
            new ServiceExceptionDefinition(1200005, "拼团已结束，无法创建新团 ");


    public static final ServiceExceptionDefinition IMAGE_NOT_EXIST =
            new ServiceExceptionDefinition(200001, "图像不存在");
    public static final ServiceExceptionDefinition IMAGE_LOGO_EXIST =
            new ServiceExceptionDefinition(200002, "LOGO图像已存在");
    public static final ServiceExceptionDefinition IMAGE_WECHAT_EXIST =
            new ServiceExceptionDefinition(200003, "二维码图片已存在");
    public static final ServiceExceptionDefinition PLATFORM_NOT_EXIST =
            new ServiceExceptionDefinition(200004, "参数不存在");
    public static final ServiceExceptionDefinition PLATFORM_EXIST =
            new ServiceExceptionDefinition(200005, "参数已存在，请勿重复添加");

    public static final ServiceExceptionDefinition NEWS_NOT_EXIST =
            new ServiceExceptionDefinition(210001, "新闻不存在");
    public static final ServiceExceptionDefinition NEWS_CATEGORY_NOT_EXIST =
            new ServiceExceptionDefinition(210002, "新闻分类不存在");
    public static final ServiceExceptionDefinition NEWS_CATEGORY_CANNOT_DELETE =
            new ServiceExceptionDefinition(210003, "分类下存在关联新闻，不允许删除");
    public static final ServiceExceptionDefinition NEWS_CATEGORY_CANNOT_REPEATED =
            new ServiceExceptionDefinition(210004, "新闻分类名称已存在");

    public static final ServiceExceptionDefinition LEASE_NOT_EXIST =
            new ServiceExceptionDefinition(220001, "租地并不存在");
    public static final ServiceExceptionDefinition LEASE_CATEGORY_CANNOT_DELETE =
            new ServiceExceptionDefinition(220002, "分区下存在关联土地，不允许删除");
    public static final ServiceExceptionDefinition LEASE_LAND_IS_LEASED =
            new ServiceExceptionDefinition(220003, "土地已被租出");
    public static final ServiceExceptionDefinition LEASE_CANNOT_DELETE =
            new ServiceExceptionDefinition(220011, "地皮下存在关联土地，不允许删除");
    public static final ServiceExceptionDefinition LEASE_LAND_NOT_EXIST =
            new ServiceExceptionDefinition(220004, "土地不存在");
    public static final ServiceExceptionDefinition LEASE_LAND_CANNOT_REPEATED =
            new ServiceExceptionDefinition(220005, "土地编号已存在");
    public static final ServiceExceptionDefinition LEASE_PARTITION_CANNOT_REPEATED =
            new ServiceExceptionDefinition(220006, "分区名称已存在");
    public static final ServiceExceptionDefinition LEASE_CANNOT_REPEAT_ORDER =
            new ServiceExceptionDefinition(220007, "请勿重复下单");
    public static final ServiceExceptionDefinition LEASE_ORDER_NON_PAYMENT =
            new ServiceExceptionDefinition(220008, "还有买家尚未付款");
    public static final ServiceExceptionDefinition LEASE_SEED_NOT_EXIST =
            new ServiceExceptionDefinition(220009, "种子不存在");
    public static final ServiceExceptionDefinition LEASE_SEED_CANNOT_REPEATED =
            new ServiceExceptionDefinition(220010, "种子名称已存在");
    public static final ServiceExceptionDefinition LEASE_SEED_CANNOT_DELETE =
            new ServiceExceptionDefinition(220012, "种子正在被使用，不允许删除");



    public static ServiceExceptionDefinition buildVariableException(ServiceExceptionDefinition definition, String ...args) {
        String msg = definition.getMsg();
        for (int i = 0; i < args.length; i++) {
            msg = msg.replace("${" + i + "}", args[i]);
        }
        return new ServiceExceptionDefinition(definition.getCode(), msg);
    }




}
